package co.yixiang.modules.shop.repository;

import co.yixiang.modules.shop.domain.YxStoreBrand;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
* @author frq
* @date 2020-07-10
*/
public interface YxStoreBrandRepository extends JpaRepository<YxStoreBrand, Integer>, JpaSpecificationExecutor<YxStoreBrand> {
    @Modifying
    @Query(value = "update yx_store_brand set is_show=?1 where id=?2",nativeQuery = true)
    void updateOnsale(Integer isShow, Integer id);
}